package com.hqyj.demo.entity.vo;

public class PurchaseVo {
    private Integer currentPage;//当前页
    private Integer currentSql;//sql语句中从第几条开始
    private Integer sizePage;   //每页显示条数

    @Override
    public String toString() {
        return "PurchaseVo{" +
                "currentPage=" + currentPage +
                ", currentSql=" + currentSql +
                ", sizePage=" + sizePage +
                '}';
    }

    public PurchaseVo() {
    }

    public PurchaseVo(Integer currentPage, Integer currentSql, Integer sizePage) {
        this.currentPage = currentPage;
        this.currentSql = currentSql;
        this.sizePage = sizePage;
    }

    public Integer getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(Integer currentPage) {
        this.currentPage = currentPage;
    }

    //通过当前页以及每页条数计算sql语句中从第几条开始查询
    public Integer getCurrentSql() {
        currentSql = (currentPage - 1) * sizePage;
        return currentSql;
    }

    public Integer getSizePage() {
        return sizePage;
    }

    public void setSizePage(Integer sizePage) {
        this.sizePage = sizePage;
    }
}
